#import <Foundation/Foundation.h>
#import "YLWebImageCompat.h"

typedef NS_ENUM(NSInteger, YLImageFormat) {
    YLImageFormatUndefined = -1,
    YLImageFormatJPEG = 0,
    YLImageFormatPNG,
    YLImageFormatGIF,
    YLImageFormatTIFF,
    YLImageFormatWebP,
    YLImageFormatHEIC
};

@interface NSData (YLImageContentType)

+ (YLImageFormat)yl_imageFormatForImageData:(nullable NSData *)data;

+ (nonnull CFStringRef)yl_UTTypeFromYLImageFormat:(YLImageFormat)format;

+ (YLImageFormat)yl_imageFormatFromUTType:(nonnull CFStringRef)uttype;

@end
